<?php 
/**
* 数据库操作类
*/
class Model
{
	
	public $table;
	public $db;
	public  function __construct($table="")
	{
		try {
	
			$this->db = new PDO("mysql:host=127.0.0.1;dbname=school;charset=utf8","root",""); 

			
		} catch (PDOException  $e) {
			echo "有错误".$e;
		}
	}

	public function find($value='')
	{
		# code...
	}

	public function findAll($value='')
	{
		# code...
	}

	public function add($value='')
	{
		$sql ="insert into stu () values()";
	}

	public function del($value='')
	{
		# code...
	}

	public function save($value='')
	{
		# code...
	}
}

















 ?>